<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
    <div id='app'>
        {{msg}}
        <father></father>
        <!-- <son></son> -->
    </div>
    <script type='text/javascript'>
        var son = {
            data() {
                return {
                    msg: '我是子组件'
                }
            },
            template: '<div>{{msg}}</div>',
        }
        var father = {
            data() {
                return {
                    msg: '我是父组件'
                }
            },
            template: '<div>{{msg}}<son></son></div>',
            components: {
                son
            }
        }
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue'
            },
            components: {
                father
            }
        });
    </script>
</body>
</html>